Skip to content

Add single-step leaf-level P-model function - #302

Merged
fabern merged 23 commits into
masterfrom
simple_pmodel_v2
Jul 28, 2025
Merged

Add single-step leaf-level P-model function#302
fabern merged 23 commits into
masterfrom
simple_pmodel_v2

Conversation

@fabern

@fabern fabern commented Jul 7, 2025

Copy link
Copy Markdown
Member

Adds function for single-step leaf-level simulations of the P-model (run_pmodel_onestep_f_bysite).

This is based on the former branch simple_pmodel. This branch should be used instead of the former since it has been rebased at the end of the commit history after the luluc merge.

@fabern fabern changed the title Simple pmodel v2 Add single-step leaf-level P-model function Jul 7, 2025
fabern added 6 commits July 8, 2025 07:11
Biomee code of run_biomee_f_bysite() had been refactored using a suite of build_x() functions with the LULUC merge. This commit applies the same logic to  the output preparation for pmodel .
This prepares a refactoring with the aim to have similar matrix arguments as luluc biomee model.
@fabern

fabern commented Jul 8, 2025

Copy link
Copy Markdown
Member Author

This currently does NOT give the same result as rpmodel::rpmodel(), see vignette or test-model-runs.R.

  • needs to be fixed

@fabern

fabern commented Jul 18, 2025

Copy link
Copy Markdown
Member Author

The differences between rpmodel::rpmodel() and run_pmodel_onestep_f_bysite() were due to different method_jmaxlim and also different units:

  • iwue (Pa vs -),
  • rd (mol C m-2 vs. g C m-2), and
  • gs or gs_accl (mol C m-2 Pa-1 vs mol C / molPhotons / Pa).

@fabern
fabern force-pushed the simple_pmodel_v2 branch from bb1b8cb to d4c5518 Compare July 21, 2025 11:49
@fabern
fabern marked this pull request as ready for review July 21, 2025 12:14
@fabern
fabern requested a review from stineb July 25, 2025 16:20
@fabern

fabern commented Jul 25, 2025

Copy link
Copy Markdown
Member Author

This is now ready for review and merge.

  • Besides the functionality for the single-step p-model function, I also:
  • double-checkd and corrected many of the code comments specifying units (of ppfd, vcmax, etc...)
  • slightly refactored the Fortran-R interface of p-model similar to the current (LULUC-)BiomeE

fabern added 3 commits July 28, 2025 14:00
No change, already previously array() gave back NA is not initialized. This is now just more explicit.
Simply by using compressed RDS in vignettes
@fabern fabern mentioned this pull request Jul 28, 2025
19 tasks
@fabern
fabern merged commit 01691f8 into master Jul 28, 2025
7 checks passed
@fabern
fabern deleted the simple_pmodel_v2 branch July 28, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant